<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@ taglib prefix="spring"  uri="http://www.springframework.org/tags" %>
    <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div class="main-content">
				<!-- #section:basics/content.breadcrumbs -->
				<div class="breadcrumbs" id="breadcrumbs">
					<script type="text/javascript">
						try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
					</script>

					<ul class="breadcrumb">
						<li>
							<i class="ace-icon fa fa-home home-icon"></i>
							<a href="#">管理学员信息</a>
						</li>
					</ul><!-- /.breadcrumb -->

					<!-- #section:basics/content.searchbox -->
					<div class="nav-search" id="nav-search">
						<form class="form-search">
							<span class="input-icon">
								<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
								<i class="ace-icon fa fa-search nav-search-icon"></i>
							</span>
						</form>
					</div><!-- /.nav-search -->

					<!-- /section:basics/content.searchbox -->
				</div>

				<!-- /section:basics/content.breadcrumbs -->
				<div class="page-content">
					<!-- #section:settings.box -->
					<div class="ace-settings-container" id="ace-settings-container">
						<div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
							<i class="ace-icon fa fa-cog bigger-150"></i>
						</div>

						<div class="ace-settings-box clearfix" id="ace-settings-box">
							<div class="pull-left width-50">
								<!-- #section:settings.skins -->
								<div class="ace-settings-item">
									<div class="pull-left">
										<select id="skin-colorpicker" class="hide">
											<option data-skin="no-skin" value="#438EB9">#438EB9</option>
											<option data-skin="skin-1" value="#222A2D">#222A2D</option>
											<option data-skin="skin-2" value="#C6487E">#C6487E</option>
											<option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
										</select>
									</div>
									<span>&nbsp; Choose Skin</span>
								</div>

								<!-- /section:settings.skins -->

								<!-- #section:settings.navbar -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-navbar" />
									<label class="lbl" for="ace-settings-navbar"> Fixed Navbar</label>
								</div>

								<!-- /section:settings.navbar -->

								<!-- #section:settings.sidebar -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-sidebar" />
									<label class="lbl" for="ace-settings-sidebar"> Fixed Sidebar</label>
								</div>

								<!-- /section:settings.sidebar -->

								<!-- #section:settings.breadcrumbs -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-breadcrumbs" />
									<label class="lbl" for="ace-settings-breadcrumbs"> Fixed Breadcrumbs</label>
								</div>

								<!-- /section:settings.breadcrumbs -->

								<!-- #section:settings.rtl -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-rtl" />
									<label class="lbl" for="ace-settings-rtl"> Right To Left (rtl)</label>
								</div>

								<!-- /section:settings.rtl -->

								<!-- #section:settings.container -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-add-container" />
									<label class="lbl" for="ace-settings-add-container">
										Inside
										<b>.container</b>
									</label>
								</div>

								<!-- /section:settings.container -->
							</div><!-- /.pull-left -->

							<div class="pull-left width-50">
								<!-- #section:basics/sidebar.options -->
								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-hover" />
									<label class="lbl" for="ace-settings-hover"> Submenu on Hover</label>
								</div>

								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-compact" />
									<label class="lbl" for="ace-settings-compact"> Compact Sidebar</label>
								</div>

								<div class="ace-settings-item">
									<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-highlight" />
									<label class="lbl" for="ace-settings-highlight"> Alt. Active Item</label>
								</div>

								<!-- /section:basics/sidebar.options -->
							</div><!-- /.pull-left -->
						</div><!-- /.ace-settings-box -->
					</div><!-- /.ace-settings-container -->

					<!-- /section:settings.box -->
					<div class="page-content-area">
							<a href="changeLocale?localeType=en_US"><button type="button" class="btn btn-info"><spring:message code="page.index.english" /></button></a>
							<a href="changeLocale?localeType=zh_CN"><button type="button" class="btn btn-info"><spring:message code="page.index.chinese" /></button></a>
							<button id="addStudent" class="btn btn-info"><i class="ace-icon fa fa-plus bigger-120"></i>添加学生</button>
							<button id="batchAddStudentBtn" class="btn btn-info">
								<i class="ace-icon fa fa-plus bigger-120"></i>
								批量添加学生信息
							</button>
						<div>
							<c:if test="${not empty message}">
								<script type="text/javascript">
								alert('${message}');
								</script>
							</c:if>
						</div>
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<div class="row">
									<div class="col-xs-12">
										<table id="sample-table-1" class="table table-striped table-bordered table-hover">
											<thead>
												<tr>
													<th><spring:message code="user.id.message" /></th>
													<th><spring:message code="user.name.message" /></th>
													<th><spring:message code="user.sex.message" /></th>
													<th><spring:message code="user.birthday.message" /></th>
													<th><spring:message code="user.address.message" /></th>
													<th><spring:message code="user.phone.message" /></th>
													<th>
														<i class="ace-icon fa fa-clock-o bigger-110 hidden-480"></i>
														<spring:message code="user.action.message" />
													</th>
												</tr>
											</thead>
											<tbody>
											<c:forEach items="${userList.dates }" var="user">
												<tr>
													<td>${user.userId}</td>
													<td>${user.userName}</td>
													<td>
													<c:if test="${user.gender == 0}">
														男
													</c:if>
													<c:if test="${user.gender == 1}">
														女
													</c:if>
													</td>
													<td>${user.birthday}</td>
													<td>${user.address}</td>
													<td>${user.tel}</td>
													<td>
														<a class="btn btn-primary btn-xs show-test editStudent" >
															<i class="ace-icon fa fa-pencil bigger-120"></i>
														</a>
														<a href="javascript:if(confirm('确实要删除吗?'))location='delete/${user.userId}'">
														<button class="btn btn-xs btn-danger">
															<i class="ace-icon fa fa-trash-o bigger-120"></i>
														</button>
														</a>
													</td>
												</tr>
											</c:forEach>
											<tr>
													<td colspan="7" align="center">
														<jsp:include page="/WEB-INF/view/page/page.jsp">
															<jsp:param name="url" value="users"/>   
															<jsp:param name="items" value="${userList.totalSize}"/>
															<jsp:param name="pageSize" value="${userList.pageSize }"/>
														</jsp:include> 
													</td>
												</tr>
											</tbody>
										</table>
									</div><!-- /.span -->
								</div><!-- /.row -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content-area -->
				</div><!-- /.page-content -->
			</div><!-- /.main-content -->
			
			
			<!-- 批量导入（Modal） -->
			<div class="modal fade" id="uploadFileModal" tabindex="-1" role="dialog" aria-labelledby="showTestModal" aria-hidden="true">
			    <div class="modal-dialog">
			        <div class="modal-content">
			            <div class="modal-header">
			                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			                <h4 class="modal-title" id="batchAddModal">上传</h4>
			            </div>
			            <div class="modal-body">
			            	<input type="file" id="uploadFile" name="uploadFile" />
			            </div>
			            <div class="modal-footer">
			                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			            	<button type="button" class="btn btn-primary" id="uploadAddStudent">保存</button>
			            </div>
			        </div><!-- /.modal-content -->
			    </div><!-- /.modal -->
			</div>
			
			<!-- 添加（Modal） -->
			<div class="modal fade" id="addStudentModal" tabindex="-1" role="dialog" aria-labelledby="showTestModal" aria-hidden="true">
			    <div class="modal-dialog">
			        <div class="modal-content">
			            <div class="modal-header">
			                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			                <h4 class="modal-title" id="">添加学生</h4>
			            </div>
			            <div class="modal-body">
			            	<p><label>学号：</label><input type="text" id="userId"/><span id="userIds"></span></p>
			            	<p><label>姓名：</label><input type="text" id="userName"/><span id="userNames"></span></p>
			            	<p><label>性别：</label>
			            		<select id="gender">
			            			<option value="0">男</option>
			            			<option value="1">女</option>
			            		</select>
			            	<span id="genders"></span></p>
			        		<p><label>地址：</label><input type="text" id="address"/><span id="addresss"></span></p>
			            	<p><label>电话：</label><input type="text" id="tel"/><span id="tels"></span></p>
			            	<p><label>密码：</label><input type="password" id="password"/><span id="passwords"></span></p>
			            	<p><label>邮箱：</label><input type="text" id="email"/><span id="emails"></span></p>
			            	<p><label>出生年月：</label><input type="text" readonly="true" onClick="laydate()" id="birthday"/><span id="birthdays"></span></p>
			            </div>
			            <div class="modal-footer">
			                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			            	<button type="button" class="btn btn-primary" id="addStudentBtn">保存</button>
			            </div>
			        </div><!-- /.modal-content -->
			    </div><!-- /.modal -->
			</div>
			
			<!-- 修改（Modal） -->
			<div class="modal fade" id="editStudentModal" tabindex="-1" role="dialog" aria-labelledby="showTestModal" aria-hidden="true">
			    <div class="modal-dialog">
			        <div class="modal-content">
			            <div class="modal-header">
			                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			                <h4 class="modal-title" id="">修改学生信息</h4>
			            </div>
			            <div class="modal-body">
			            	<p><label>学号：</label><input type="text" id="userIdedit" readonly/></p>
			            	<p><label>姓名：</label><input type="text" id="userNameedit"/><span id="userNames1"></span></p>
			            	<p><label>性别：</label>
			            		<select id="genderedit">
			            			<option value="0">男</option>
			            			<option value="1">女</option>
			            		</select>
			            	<span id="genders"></span></p>
			        		<p><label>地址：</label><input type="text" id="addressedit"/><span id="addresss1"></span></p>
			            	<p><label>电话：</label><input type="text" id="teledit"/><span id="tels1"></span></p>
			            	<p><label>邮箱：</label><input type="text" id="emailedit"/><span id="emails1"></span></p>
			            	<p><label>出生年月：</label><input type="text" readonly="true" onClick="laydate()" id="birthdayedit"/><span id="birthdays1"></span></p>
			            </div>
			            <div class="modal-footer">
			                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			            	<button type="button" class="btn btn-primary" id="edistStudentBtn">保存</button>
			            </div>
			        </div><!-- /.modal-content -->
			    </div><!-- /.modal -->
			</div>
</body>
</html>
